/*
 * Created by JFormDesigner on Tue Dec 14 20:05:34 CST 2021
 */

package com.cn.项目.飞机预约管理系统.UserFrame;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;


public class MyPessenger extends JFrame {

    public MyPessenger() {
        initComponents();
    }

    public static String name = null;



    //查询监听
    private void button1ActionPerformed(ActionEvent e) {
        // TODO add your code here

      name = textField1.getText();
       new MyPFrame();
       this.dispose();
    }

    private void initComponents() {
        // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
        label1 = new JLabel();
        label2 = new JLabel();
        textField1 = new JTextField();
        button1 = new JButton();

        //======== this ========
        setVisible(true);
        Container contentPane = getContentPane();
        contentPane.setLayout(null);

        //---- label1 ----
        label1.setText("查询我的乘客");
        label1.setFont(label1.getFont().deriveFont(label1.getFont().getSize() + 12f));
        label1.setForeground(new Color(255, 51, 0));
        contentPane.add(label1);
        label1.setBounds(110, 10, 185, 35);

        //---- label2 ----
        label2.setText("姓名");
        label2.setFont(label2.getFont().deriveFont(label2.getFont().getSize() + 6f));
        contentPane.add(label2);
        label2.setBounds(40, 85, 65, 35);

        //---- textField1 ----
        textField1.setText("输入代买人姓名");
        contentPane.add(textField1);
        textField1.setBounds(130, 85, 140, 35);

        //---- button1 ----
        button1.setText("查询");
        button1.setFont(button1.getFont().deriveFont(button1.getFont().getSize() + 6f));
        button1.setForeground(new Color(0, 255, 102));
        button1.addActionListener(e -> button1ActionPerformed(e));
        contentPane.add(button1);
        button1.setBounds(105, 160, 160, button1.getPreferredSize().height);

        contentPane.setPreferredSize(new Dimension(375, 270));
        pack();
        setLocationRelativeTo(getOwner());
        // JFormDesigner - End of component initialization  //GEN-END:initComponents
    }

    // JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables
    private JLabel label1;
    private JLabel label2;
    private JTextField textField1;
    private JButton button1;
    // JFormDesigner - End of variables declaration  //GEN-END:variables
}
